libmath.so:calc_so.o Print_so.o
	gcc -shared -o libcalc.so calc_so.o Print_so.o
calc_so.o:calc.c
	gcc -fPIC -c calc.c -o calc_so.o -std=c99 
Print_so.o:Print.c
	gcc -fPIC -c Print.c -o Print_so.o -std=c99 

.PHONY:output
output:
	mkdir -p lib_dyl/lib 
	mkdir -p lib_dyl/include
	cp *.so lib_dyl/lib 
	cp *.h lib_dyl/include

.PHONY:clean 
clean:
	rm -rf *.o *.so lib_dyl



#libmath.a:calc.o Print.o
#	ar -rc libmath.a calc.o Print.o
#
#calc.o:calc.c
#	gcc -c calc.c -o calc.o -std=c99
#Print.o:Print.c
#	gcc -c Print.c -o Print.o -std=c99 
#
#.PHONY:output
#output:
#	mkdir -p lib-static/lib 
#	mkdir -p lib-static/include
#	cp *.a lib-static/lib 
#	cp *.h lib-static/include
#
#.PHONY:clean
#clean:
#	rm -rf *.o *.a lib-static
